package pers.cz.common.sharding;

/**
 * @program: Jef-orm
 * @description: 当前规则
 * @author: Cheng Zhi
 * @create: 2023-11-01 14:51
 **/
public class Ruling {

    /**
     * 分表值，通过该值计算分表
     */
    private Object value;

    /**
     * 分表策略
     */
    private ShardingStrategy shardingStrategy;

    /**
     * 分表计算值
     */
    private String modulus;

    /**
     * 其他参数，暂时未使用到
     */
    private String[] params;

    /**
     * 默认拼接符
     */
    private String appender = "_";

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }

    public ShardingStrategy getShardingStrategy() {
        return shardingStrategy;
    }

    public void setShardingStrategy(ShardingStrategy shardingStrategy) {
        this.shardingStrategy = shardingStrategy;
    }

    public String getModulus() {
        return modulus;
    }

    public void setModulus(String modulus) {
        this.modulus = modulus;
    }

    public String[] getParams() {
        return params;
    }

    public void setParams(String[] params) {
        this.params = params;
    }

    public String getAppender() {
        return appender;
    }

    public void setAppender(String appender) {
        this.appender = appender;
    }
}
